reversing a range of numbers in python